//
//  DFClickViedioViewController.m
//  DFront
//
//  Created by lanou on 15/10/30.
//  Copyright © 2015年 xuzenghui. All rights reserved.
//

#import "DFClickViedioViewController.h"
#import "RTSpinKitView.h"
@interface DFClickViedioViewController ()<UIWebViewDelegate>
@property (nonatomic,strong)RTSpinKitView *refreash;
@end

@implementation DFClickViedioViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    
    [self.topView addSubview:self.backBtn];
    
    UIWebView *webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, - 40, kScreenWidth, kScreenHeight + 40)];
    NSString *str1 = [self.str substringFromIndex:1];
    NSString *str2 = [@"http://v.zol.com.cn/video" stringByAppendingString:str1];
    NSString *str3 = [str2 stringByAppendingString:@".html"];
    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:str3]]];
    [self.view addSubview:webView];
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 20)];
    label.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:self.topView];
    [self.view addSubview:label];
    // Do any additional setup after loading the view.
    
    //  加载动画
    CGRect screenBounds = [[UIScreen mainScreen] bounds];
    _refreash = [[RTSpinKitView alloc]initWithStyle:RTSpinKitViewStyleWanderingCubes color:[UIColor redColor]];
    _refreash.center = CGPointMake(CGRectGetMidX(screenBounds), CGRectGetMidY(screenBounds));
    [self.view addSubview:_refreash];

}

-(void)webViewDidFinishLoad:(UIWebView *)webView
{
    [_refreash removeFromSuperview];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}





/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
